using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WebFoundation;

namespace MHI.InspectionManager.Interfaces
{
	/// <summary>
	/// DevJobplanT,table entity:dev_jobplan_t 
	/// </summary>
	public class DevJobplanT
	{
		public static readonly string KeyId;
		public static readonly string KeyPlanName;
		public static readonly string KeyPlanLevel;
		public static readonly string KeyPlanType;
		public static readonly string KeyPlanSubtype;
		public static readonly string KeyPlanStatus;
		public static readonly string KeyPlanStarttime;
		public static readonly string KeyPlanEndtime;
		public static readonly string KeyPlanCirclePeriod;
		public static readonly string KeyPlanTeam;
		public static readonly string KeyPlanCircleUnit;
		public static readonly string KeyVerifyPerson;
		public static readonly string KeyPersonCreated;
		public static readonly string KeyGmtCreated;
		public static readonly string KeyPersonModified;
		public static readonly string KeyGmtModified;
		public static readonly string KeyStateInfo;
		public static readonly string KeyIsUse;
		public static readonly string KeyVersion;
		

		static DevJobplanT()
		{
			KeyId = ExpressionHelper.GetPropertyName<DevJobplanT>(r => r.Id);
			KeyPlanName = ExpressionHelper.GetPropertyName<DevJobplanT>(r => r.PlanName);
			KeyPlanLevel = ExpressionHelper.GetPropertyName<DevJobplanT>(r => r.PlanLevel);
			KeyPlanType = ExpressionHelper.GetPropertyName<DevJobplanT>(r => r.PlanType);
			KeyPlanSubtype = ExpressionHelper.GetPropertyName<DevJobplanT>(r => r.PlanSubtype);
			KeyPlanStatus = ExpressionHelper.GetPropertyName<DevJobplanT>(r => r.PlanStatus);
			KeyPlanStarttime = ExpressionHelper.GetPropertyName<DevJobplanT>(r => r.PlanStarttime);
			KeyPlanEndtime = ExpressionHelper.GetPropertyName<DevJobplanT>(r => r.PlanEndtime);
			KeyPlanCirclePeriod = ExpressionHelper.GetPropertyName<DevJobplanT>(r => r.PlanCirclePeriod);
			KeyPlanTeam = ExpressionHelper.GetPropertyName<DevJobplanT>(r => r.PlanTeam);
			KeyPlanCircleUnit = ExpressionHelper.GetPropertyName<DevJobplanT>(r => r.PlanCircleUnit);
			KeyVerifyPerson = ExpressionHelper.GetPropertyName<DevJobplanT>(r => r.VerifyPerson);
			KeyPersonCreated = ExpressionHelper.GetPropertyName<DevJobplanT>(r => r.PersonCreated);
			KeyGmtCreated = ExpressionHelper.GetPropertyName<DevJobplanT>(r => r.GmtCreated);
			KeyPersonModified = ExpressionHelper.GetPropertyName<DevJobplanT>(r => r.PersonModified);
			KeyGmtModified = ExpressionHelper.GetPropertyName<DevJobplanT>(r => r.GmtModified);
			KeyStateInfo = ExpressionHelper.GetPropertyName<DevJobplanT>(r => r.StateInfo);
			KeyIsUse = ExpressionHelper.GetPropertyName<DevJobplanT>(r => r.IsUse);
			KeyVersion = ExpressionHelper.GetPropertyName<DevJobplanT>(r => r.Version);
		}
		

		private long _id; 
		private string _planName; 
		private string _planLevel; 
		private string _planType; 
		private string _planSubtype; 
		private string _planStatus; 
		private DateTime? _planStarttime; 
		private DateTime? _planEndtime; 
		private int? _planCirclePeriod; 
		private string _planTeam; 
		private string _planCircleUnit; 
		private string _verifyPerson; 
		private string _personCreated; 
		private DateTime? _gmtCreated; 
		private string _personModified; 
		private DateTime? _gmtModified; 
		private float? _stateInfo; 
		private int _isUse; 
		private long _version; 
		

		/// <summary>
		///  Id, column: id required
		/// </summary>
		[DisplayName("编码")]
		[Required]
		public long Id
		{
			get{ return _id; }
			set
			{
				if(_id != value)
				{
					_id = value;
					NotifyOfChange(KeyId);
				}
			}
		}

		/// <summary>
		///  PlanName, column: plan_name 
		/// </summary>
		[DisplayName("计划名称")]
		public string PlanName
		{
			get{ return _planName; }
			set
			{
				if(_planName != value)
				{
					_planName = value;
					NotifyOfChange(KeyPlanName);
				}
			}
		}

		/// <summary>
		///  PlanLevel, column: plan_level 
		/// </summary>
		[DisplayName("任务等级 严重、一般、常规等")]
		public string PlanLevel
		{
			get{ return _planLevel; }
			set
			{
				if(_planLevel != value)
				{
					_planLevel = value;
					NotifyOfChange(KeyPlanLevel);
				}
			}
		}

		/// <summary>
		///  PlanType, column: plan_type 
		/// </summary>
		[DisplayName("工单类型 巡检计划、巡检故障、计划维修、突发维修、大修、计划养护等")]
		public string PlanType
		{
			get{ return _planType; }
			set
			{
				if(_planType != value)
				{
					_planType = value;
					NotifyOfChange(KeyPlanType);
				}
			}
		}

		/// <summary>
		///  PlanSubtype, column: plan_subtype 
		/// </summary>
		[DisplayName("工单子类型 如普通巡检、地图巡检等")]
		public string PlanSubtype
		{
			get{ return _planSubtype; }
			set
			{
				if(_planSubtype != value)
				{
					_planSubtype = value;
					NotifyOfChange(KeyPlanSubtype);
				}
			}
		}

		/// <summary>
		///  PlanStatus, column: plan_status 
		/// </summary>
		[DisplayName("工单状态 未下达、已下达、未审核、已审核")]
		public string PlanStatus
		{
			get{ return _planStatus; }
			set
			{
				if(_planStatus != value)
				{
					_planStatus = value;
					NotifyOfChange(KeyPlanStatus);
				}
			}
		}

		/// <summary>
		///  PlanStarttime, column: plan_starttime 
		/// </summary>
		[DisplayName("任务开始时间")]
		public DateTime? PlanStarttime
		{
			get{ return _planStarttime; }
			set
			{
				if(_planStarttime != value)
				{
					_planStarttime = value;
					NotifyOfChange(KeyPlanStarttime);
				}
			}
		}

		/// <summary>
		///  PlanEndtime, column: plan_endtime 
		/// </summary>
		[DisplayName("任务结束时间")]
		public DateTime? PlanEndtime
		{
			get{ return _planEndtime; }
			set
			{
				if(_planEndtime != value)
				{
					_planEndtime = value;
					NotifyOfChange(KeyPlanEndtime);
				}
			}
		}

		/// <summary>
		///  PlanCirclePeriod, column: plan_circle_period 
		/// </summary>
		[DisplayName("任务执行周期时长")]
		public int? PlanCirclePeriod
		{
			get{ return _planCirclePeriod; }
			set
			{
				if(_planCirclePeriod != value)
				{
					_planCirclePeriod = value;
					NotifyOfChange(KeyPlanCirclePeriod);
				}
			}
		}

		/// <summary>
		///  PlanTeam, column: plan_team 
		/// </summary>
		[DisplayName("负责班组")]
		public string PlanTeam
		{
			get{ return _planTeam; }
			set
			{
				if(_planTeam != value)
				{
					_planTeam = value;
					NotifyOfChange(KeyPlanTeam);
				}
			}
		}

		/// <summary>
		///  PlanCircleUnit, column: plan_circle_unit 
		/// </summary>
		[DisplayName("任务执行周期单位 按日、按周、按月、15天等")]
		public string PlanCircleUnit
		{
			get{ return _planCircleUnit; }
			set
			{
				if(_planCircleUnit != value)
				{
					_planCircleUnit = value;
					NotifyOfChange(KeyPlanCircleUnit);
				}
			}
		}

		/// <summary>
		///  VerifyPerson, column: verify_person 
		/// </summary>
		[DisplayName("审核人")]
		public string VerifyPerson
		{
			get{ return _verifyPerson; }
			set
			{
				if(_verifyPerson != value)
				{
					_verifyPerson = value;
					NotifyOfChange(KeyVerifyPerson);
				}
			}
		}

		/// <summary>
		///  PersonCreated, column: person_created 
		/// </summary>
		[DisplayName("创建人")]
		public string PersonCreated
		{
			get{ return _personCreated; }
			set
			{
				if(_personCreated != value)
				{
					_personCreated = value;
					NotifyOfChange(KeyPersonCreated);
				}
			}
		}

		/// <summary>
		///  GmtCreated, column: gmt_created 
		/// </summary>
		[DisplayName("创建时间")]
		public DateTime? GmtCreated
		{
			get{ return _gmtCreated; }
			set
			{
				if(_gmtCreated != value)
				{
					_gmtCreated = value;
					NotifyOfChange(KeyGmtCreated);
				}
			}
		}

		/// <summary>
		///  PersonModified, column: person_modified 
		/// </summary>
		[DisplayName("更新人")]
		public string PersonModified
		{
			get{ return _personModified; }
			set
			{
				if(_personModified != value)
				{
					_personModified = value;
					NotifyOfChange(KeyPersonModified);
				}
			}
		}

		/// <summary>
		///  GmtModified, column: gmt_modified 
		/// </summary>
		[DisplayName("更新时间")]
		public DateTime? GmtModified
		{
			get{ return _gmtModified; }
			set
			{
				if(_gmtModified != value)
				{
					_gmtModified = value;
					NotifyOfChange(KeyGmtModified);
				}
			}
		}

		/// <summary>
		///  StateInfo, column: state_info 
		/// </summary>
		[DisplayName("标识状态")]
		public float? StateInfo
		{
			get{ return _stateInfo; }
			set
			{
				if(_stateInfo != value)
				{
					_stateInfo = value;
					NotifyOfChange(KeyStateInfo);
				}
			}
		}

		/// <summary>
		///  IsUse, column: is_use 
		/// </summary>
		[DisplayName("是否可用")]
		[Required]
		public int IsUse
		{
			get{ return _isUse; }
			set
			{
				if(_isUse != value)
				{
					_isUse = value;
					NotifyOfChange(KeyIsUse);
				}
			}
		}

		/// <summary>
		///  Version, column: version 
		/// </summary>
		[DisplayName("版本")]
		[Required]
		public long Version
		{
			get{ return _version; }
			set
			{
				if(_version != value)
				{
					_version = value;
					NotifyOfChange(KeyVersion);
				}
			}
		}

		public event PropertyChangedEventHandler PropertyChanged;

		private void NotifyOfChange(string propertyName)
		{
			if (this.PropertyChanged != null)
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
	}
}
